Skip to content

Add option to render compound field without the chrome#5137

Merged
burieberry merged 3 commits into
mainfrom
cs-11412-contains-many-without-chrome
Jun 9, 2026
Merged

Add option to render compound field without the chrome#5137
burieberry merged 3 commits into
mainfrom
cs-11412-contains-many-without-chrome

Conversation

@burieberry

@burieberry burieberry commented Jun 5, 2026

Copy link
Copy Markdown
Contributor
  • @displayContainer argument is currently only used for CardDefs. I propose providing this option to compound fields as well (including containsMany field), to be able to render the field without the chrome around it. This makes it easier to style the component and items.
  • ContainsMany field editor is unaffected as the default edit template of containsMany field.

Summary

  • Adds a @displayContainer argument to containsMany field components, allowing callers to
    render list items directly without the wrapping plural-field div and its associated chrome
    (borders, spacing, scaffold).
  • When @displayContainer={{false}}, containsMany-component renders each child item bare;
    the argument is forwarded to child field components so compound fields also skip their
    container wrapper.

Why

Card authors composing custom layouts need to embed a containsMany field inside their own
markup — a <ul>, a CSS grid, a BoxelContainer — without fighting the default container's
styles and structure. The new argument opts out of that chrome while keeping the field's
rendering and format logic intact.

Test plan

  • card-basics-test.gts — new integration tests cover @displayContainer={{false}} on a
    containsMany field: items render without the wrapper div, and the default
    (@displayContainer omitted / true) continues to render the chrome as before.

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Preview deployments

Host Test Results

    1 files  ±0      1 suites  ±0   1h 47m 17s ⏱️ - 4m 43s
2 986 tests ±0  2 971 ✅ ±0  15 💤 ±0  0 ❌ ±0 
3 005 runs  ±0  2 990 ✅ ±0  15 💤 ±0  0 ❌ ±0 

Results for commit 195c155. ± Comparison against earlier commit dd22269.

Realm Server Test Results

    1 files  ±0      1 suites  ±0   9m 55s ⏱️ +31s
1 575 tests ±0  1 575 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 666 runs  ±0  1 666 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 195c155. ± Comparison against earlier commit dd22269.

@burieberry burieberry marked this pull request as ready for review June 5, 2026 22:21
@burieberry burieberry force-pushed the cs-11412-contains-many-without-chrome branch from 7ad0fa7 to dd22269 Compare June 9, 2026 16:44
@burieberry burieberry force-pushed the cs-11412-contains-many-without-chrome branch from dd22269 to 195c155 Compare June 9, 2026 18:52
@burieberry burieberry requested a review from a team June 9, 2026 18:53
@burieberry burieberry merged commit d6922fc into main Jun 9, 2026
99 of 101 checks passed
@burieberry burieberry deleted the cs-11412-contains-many-without-chrome branch June 9, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants